/**
 * Class describing the Head of the group
 * 
 * @param name
 *            Name of the elder
 * @param phoneNumber
 *            Phone number of the head of the group
 * @author Timur Suleimanov
 */
class HeadOfTheGroup extends Student {
	private boolean isHead = true;

	public HeadOfTheGroup(String name, String phoneNumber) {
		super(name, phoneNumber);
	}

	public boolean isHead() {
		return isHead;
	}

	/**
	 * Displays a list of student of the group and their contacts
	 * 
	 */
	public void printStudentContacts(Group group, Student... students) {
		if (group == null) {
			System.out.println("The group is empty");
		} else {
			System.out.printf("Group %s contacts:\n", group.getGroupName());
			for (Student currentStudent : students) {
				System.out.printf("%s, He is a head of the group?- %b\n",
						currentStudent.getDescription(),
						currentStudent.isHead());
			}
		}
	}

	/**
	 * Displays the contact address and phone number of the deanery
	 * 
	 * @param dean
	 *            deanery
	 */
	public void printDeaneryContacts(Deanery dean) {
		System.out.println("Deanery contacts:");
		System.out.printf("Deanery address is %s, phone number %s\n",
				dean.getDeaneryAddress(), dean.getPhoneNumber());
	}
}